#include<stdio.h>
int main()
{
	int a, b, c;
	a = 1, b = 0, c = 0;
	for (c=0;c <= 500;c++)
	{
		b = a * a;
		c = c + b;
		a++;
	}
	printf("n=%d\n", a);
	return 0;
}